#! /usr/bin/env python

# Global const
import globalconst as CONST

CONST.foo = 'foo'
print(CONST.foo)

CONST.bar = 'bar'
print(CONST.bar)

try:
	CONST.foo = 9000
except Exception, e:
	print(e)

# Instance const
from const import Const

colors = Const()
colors.red=(255,0,0)
colors.green=(0,255,0)
colors.blue=(0,0,255)

risc = Const()
risc.arm='ARM'
risc.mips='MIPS'

print(colors.red, colors.green, colors.blue)
print(risc.arm, risc.mips)

try:
	colors.red=9000
except Exception, e:
	print(e)
